﻿using System;
using System.Globalization;
using System.Windows.Data;

namespace Coding4Fun.FakeCall.Converters
{
	public class FullTimeConverter : IValueConverter
	{
		public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
		{
			return value == null ? "XX:XX" : ReturnValue((DateTime)value);
		}

		public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
		{
			throw new NotImplementedException();
		}

		public static string ReturnValue(DateTime value)
		{
			return value.ToString("h:mm tt");
		}
	}
}
